import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class ItemButton extends StatelessWidget {
  final String name;
  final String roate;

  ItemButton(this.name, this.roate);

  @override
  Widget build(BuildContext context) {
    return FlatButton(
        padding: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
        onPressed: () => Navigator.pushNamed(context, roate),
        child: Text(
          name,
          style: TextStyle(fontSize: 20, color: Colors.blue),
        ));
  }
}